import { CoolCommException } from "@cool-midway/core";
import { Rule, RuleType } from "@midwayjs/validate";

// 发起加入团队请求
export class JoinRequestDTO {
  @Rule(RuleType.string().required().error(new CoolCommException('团队邀请码不能为空')))
  inviteCode: string;
}

// 审核加入团队请求
export class AuditJoinRequestDTO {
  @Rule(RuleType.number().required().error(new CoolCommException('缺少申请标识')))
  joinId: number;

  @Rule(RuleType.boolean().required().error(new CoolCommException('缺少审核结果')))
  approve: boolean;

  @Rule(RuleType.string().optional().allow('').max(255))
  rejectReason?: string;
}


